#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;

    double p=1,q=2;
    double sum = q / p;
    for (int i = 1; i < n; i++)
    {
        double temp_p = 0, temp_q = 0;
        temp_p = p;
        temp_q = q;
        p = temp_q;
        q = temp_q + temp_p;
        double val = q / p;
        sum += val;
    }
    printf("%.4f", sum);
    
    return 0;
}